﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Workflows.Components.Reports
{
	/// <summary>
	/// no foreign/primary keys, just left and right
	/// using string for key comparison
	/// key can be composite fields and concatenated using transformation
	/// </summary>
	[Serializable]
	public class SetJoin
	{
		private string _LeftSetName;
		/// <summary></summary>
		public string LeftSetName
		{
			get
			{
				return this._LeftSetName;
			}
			set
			{
				this._LeftSetName = value;
			}
		}

		private string[] _LeftKeyNames;
		/// <summary></summary>
		public string[] LeftKeyNames
		{
			get
			{
				return this._LeftKeyNames;
			}
			set
			{
				this._LeftKeyNames = value;
			}
		}

		private string _LeftKeyTransformation;
		/// <summary>using string formular exist in excel</summary>
		public string LeftKeyTransformation
		{
			get
			{
				return this._LeftKeyTransformation;
			}
			set
			{
				this._LeftKeyTransformation = value;
			}
		}

		private string _RightSetName;
		/// <summary></summary>
		public string RightSetName
		{
			get
			{
				return this._RightSetName;
			}
			set
			{
				this._RightSetName = value;
			}
		}

		private string[] _RightKeyNames;
		/// <summary></summary>
		public string[] RightKeyNames
		{
			get
			{
				return this._RightKeyNames;
			}
			set
			{
				this._RightKeyNames = value;
			}
		}

		private string _RightKeyTransformation;
		/// <summary>using string formular exist in excel</summary>
		public string RightKeyTransformation
		{
			get
			{
				return this._RightKeyTransformation;
			}
			set
			{
				this._RightKeyTransformation = value;
			}
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="leftSetName"></param>
		/// <param name="leftKeyNames"></param>
		/// <param name="leftTransformation"></param>
		/// <param name="rightSetName"></param>
		/// <param name="rightKeyNames"></param>
		/// <param name="rightTransformation"></param>
		public SetJoin(string leftSetName, string[] leftKeyNames, string leftTransformation,
			string rightSetName, string[] rightKeyNames, string rightTransformation)
		{
			this._LeftSetName = leftSetName;
			this._LeftKeyNames = leftKeyNames;
			this._LeftKeyTransformation = leftTransformation;
			this._RightSetName = rightSetName;
			this._RightKeyNames = rightKeyNames;
			this._RightKeyTransformation = rightTransformation;
		}
	}
}
